package com.yunshan.member.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.yunshan.common.annotation.Excel;
import com.yunshan.common.core.domain.BaseEntity;
import com.yunshan.order.domain.OrderConsumeRecord;
import com.yunshan.order.domain.OrderUniVo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 副卡信息对象 member_sub_card_info
 *
 * @author yunshan
 * @date 2025-01-17
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class MemberSubCardInfo extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private Long id;

    /** 副卡姓名 */
    @ApiModelProperty("副卡姓名")
    @Excel(name = "副卡姓名")
    private String name;

    /** 手机号 */
    @ApiModelProperty("手机号")
    @Excel(name = "手机号")
    private String phone;

    /** 主卡会员id */
    @ApiModelProperty("主卡会员id")
    @Excel(name = "主卡会员id")
    private Long memberId;

    /** 主卡会员姓名 */
    @ApiModelProperty("主卡会员姓名")
    @Excel(name = "主卡会员姓名")
    private String memberName;

    /** 会籍类型：1业主会籍，2精英会籍，3公司会籍，4临时会籍 */
    @ApiModelProperty("会籍类型：1业主会籍，2精英会籍，3公司会籍，4临时会籍")
    @Excel(name = "会籍类型：1业主会籍，2精英会籍，3公司会籍，4临时会籍")
    private String memberType;

    /** 累计消费金额 */
    @ApiModelProperty("累计消费金额")
    @Excel(name = "累计消费金额")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "#0.00")
    private BigDecimal totalAmount;

    /** 状态 0.待审核 1.使用中 2.审核驳回 3.已销卡 */
    @ApiModelProperty("状态 0.待审核 1.使用中 2.审核驳回 3.已销卡")
    @Excel(name = "状态 0.待审核 1.使用中 2.审核驳回 3.已销卡")
    private Integer status;

    /** 驳回理由 */
    @ApiModelProperty("驳回理由")
    @Excel(name = "驳回理由")
    private String rejectMessage;

    /** 开卡时间 */
    @ApiModelProperty("开卡时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "开卡时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date issueTime;

    /** 微信用户id */
    @ApiModelProperty("微信用户id")
    @Excel(name = "微信用户id")
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private Long userId;

    /** 登录手机号 */
    @ApiModelProperty("登录手机号")
    @Excel(name = "登录手机号")
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private String loginPhone;

    /** 是否删除0:未删除,1:删除 */
    @ApiModelProperty("是否删除0:未删除,1:删除")
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private Integer isDeleted;

    /** 开始时间 */
    @ApiModelProperty("开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private Date startTime;

    /** 结束时间 */
    @ApiModelProperty("结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private Date endTime;

    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private MemberUserInfo memberUserInfo;

    private OrderUniVo orderConsumeRecord;

    private List<OrderUniVo> orderConsumeRecords;
}
